var i;
Object.defineProperty(exports, "__esModule", {
  value: true
});
var UI_ShopItemInfo_UIBindings = require("AA_UI_ShopItemInfo_UIBindings");
var UIView = require("AA_UIView");
var Const_Hall = require("AA_Const_Hall");
var CommonUtils = require("AA_CommonUtils");
var BundleConfig = require("AA_BundleConfig");
var _decorator = cc._decorator;
var _ccclass = _decorator.ccclass;
var _property = _decorator.property;

var _def_UI_ShopItemInfo = function (e) {
  function _creator() {
    var t = null !== e && e.apply(this, arguments) || this;
    t.auto_ui = null;
    return t;
  }
  __extends(_creator, e);
  _creator.prototype._show = function (e) {
    var t = this.auto_ui;
    t.txt_titleLabel.string = e.titleName;
    t.sp_iconBg.spriteFrame = e.qualitySpriteFrame;
    t.sp_iconSprite.spriteFrame = e.iconSpriteFrame;
    e.qualitySpriteFrame || this._loadRes(BundleConfig.BundleNames.Common, "common/" + "res/quality/quality_1", cc.SpriteFrame).then(function (e) {
      t.sp_iconBg.spriteFrame = e;
    });
    CommonUtils.default.LimitSpriteMaxSize(t.sp_iconSprite, Const_Hall.equipIconSize);
    t.txt_countLabel.string = e.count + "";
    t.txt_infoLabel.string = e.infoStr;
    t.node_videoIcon.active = e.richType == Const_Hall.RichType.视频;
    t.node_goldIcon.active = e.richType == Const_Hall.RichType.金币;
    t.node_diamondIcon.active = e.richType == Const_Hall.RichType.钻石;
    t.txt_priceLabel.string = e.price + "";
    this.clickCallBack = e.clickCallBack;
  };
  _creator.prototype._clickListener = function (e) {
    var t = this.auto_ui;
    switch (e) {
      case t.btn_closeBtn:
        this._close();
        break;
      case t.btn_clickBtn:
        this.clickCallBack && this.clickCallBack();
        this._close();
    }
  };
  __decorate([_property(UI_ShopItemInfo_UIBindings.default)], _creator.prototype, "auto_ui", undefined);
  return __decorate([_ccclass], _creator);
}(UIView.default);
exports.default = _def_UI_ShopItemInfo;